<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Hello World (CF)</title>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">

        <!-- Le styles -->
        <link href="/library/twitterboopstrap/css/bootstrap.css" rel="stylesheet">
        <style type="text/css">
            body {
                padding-top: 60px;
                padding-bottom: 40px;
                background-image: url('/img/wallpaper.jpg');
            }
            .hero-unit{
                background-color: #fff
            }
            #message-box{
                display: none;
            }
        </style>
        <link href="/library/twitterboopstrap/css/bootstrap-responsive.css" rel="stylesheet">

        <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
          <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
        <script type="text/javascript" src="/library/jquery/jquery.min.js"></script>
        <script type="text/javascript" src="/library/twitterboopstrap/js/bootstrap.min.js"></script>
        <script type="text/javascript" src="/library/inputmask/jquery.maskedinput-1.3.min.js"></script>
        <script type="text/javascript" src="/library/validate/jquery.validate.pt-Br.js"></script>
        <script type="text/javascript" src="/library/validate/jquery.validate.cnpj.pt-Br.js"></script>
        <script type="text/javascript" src="/library/tablesort/js/jquery.tablesorter.min.js"></script>
        <script type="text/javascript" src="/library/jqueryui/js/jquery-ui-1.8.21.custom.min.js"></script>
        <script type="text/javascript" src="/js/util.js"></script>
        <script type="text/javascript" src="/js/index.js"></script>
        <script type="text/javascript" src="/js/produto.js"></script>
        <script type="text/javascript" src="/js/usuario.js"></script>
        <script type="text/javascript" src="/js/venda.js"></script>
        <script type="text/javascript" src="/js/promocao.js"></script>

    </head>

    <body>

        <div class="container">

            <!-- Main hero unit for a primary marketing message or call to action -->
            <div class="hero-unit">
                <h1>Hello World (CF)!</h1>
                <p>Cerberos Framework (v1.0)</p>

                <hr>
                <hr>

                <h2>Autenticação</h2>
                <hr>
                <fieldset>
                    <form id="formAuthUsuario" method="post" action="/usuario/auth/ajax/true">
                        <div class="control-group">
                            <label class="control-label" for="tx_email">Email</label>
                            <div class="controls">
                                <input class="input-xlarge focused required email" id="tx_email" name="tx_email" type="text" maxlength="50">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="vl_produto">Senha</label>
                            <div class="controls">
                                <input class="input-xlarge focused required" id="tx_senha" name="tx_senha" type="password">
                            </div>
                        </div>
                        <div class="">
                            <button type="submit" class="btn btn-primary">Entrar</button>
                        </div>
                    </form>
                </fieldset>
            </div>

            <!--messagebox-->
            <div class="modal" id="message-box">
                <div class="modal-header">
                    <a class="close" data-dismiss="modal">×</a>
                    <h3 class="title"></h3>
                </div>
                <div class="modal-body">
                    <p class="content"></p>
                </div>
                <div class="modal-footer">
                    <a href="#" class="btn btn-primary close-message-box">Ok</a>
                </div>
            </div>

            <footer>
                <p>&copy; Hello World (CF) 2012</p>
            </footer>
        </div> <!-- /container -->
    </body>
</html>

<script type="text/javascript">

        !(function($){
    'use strict'
    $(document).ready(function(){
                
    // Validacao do Formulario : Novo Produto
    var process = false;
    var formNew = $('#formAuthUsuario');
    var actionNew = formNew.attr('action');
       
    $("#formAuthUsuario").validate({
    errorClass: "help-inline",
    submitHandler: function() {
    if(!process){
    process = true;
    $.post(actionNew, formNew.serialize(), function(response){
    if(response.status == 'success'){
    window.location = response.url;
}else{
Util.showMessageBox(response);
}                        
process = false;
}, 'json');  
}
}
});
        
});


})(jQuery);


</script>